﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace tenexercise
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("输入一个正数: ");
            double number = double.Parse(Console.ReadLine());
            if (number%1<0.5)
            {
             double  number1=number -(number%1);
                Console.WriteLine("四舍五入运算后为： "+number1);
            }
            else
            {
                double number1 = number+1 - (number % 1);
                Console.WriteLine("四舍五入运算后为： " + number1);
            }
            Console.ReadKey();

        }
    }
}
